<template>
  <a-row :gutter="10">
    <!-- 地块 -->
    <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
      <a-card :bordered="false">
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <!-- 搜索区域 -->
          <a-form layout="inline" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="12" :sm="8">
                <a-form-item label="地块名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
                  <a-input placeholder="" v-model="queryParam.name"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="12" :sm="24">
               <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" style="margin: 5px 0 10px 2px">
          <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
        </div>

        <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
          <i class="anticon anticon-info-circle ant-alert-icon">
          </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>项
          <a style="margin-left: 24px" @click="onClearSelected1">清空</a>
        </div>

        <div style="margin-top: 15px">
          <a-table
            style="height:500px"
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
            @change="handleTableChange">
          <span slot="action" slot-scope="text, record">
             <a @click="handleEdit(record)">编辑</a>
            <a-divider type="vertical"/>

            <a-dropdown>
              <a class="ant-dropdown-link">
                更多 <a-icon type="down"/>
              </a>
              <a-menu slot="overlay">
                <a-menu-item>
                   <a @click="handleOpen(record)">关联闸门</a>
                </a-menu-item>
                <a-menu-item>
                   <a @click="handleOpen3(record)">关联摄像头</a>
                </a-menu-item>
                <a-menu-item>
                   <a @click="handleOpen4(record)">关联墒情仪</a>
                </a-menu-item>
                <a-menu-item>
                   <a @click="handleOpen5(record)">关联机井</a>
                </a-menu-item>
                <a-menu-item>
                   <a @click="handleOpen6(record)">关联液位计</a>
                </a-menu-item>
                <a-menu-item>
                  <a @click="handleDetail(record)">详情</a>
                </a-menu-item>
                
                <a-menu-item>
                  <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
                    <a>删除</a>
                  </a-popconfirm>
                </a-menu-item>
              </a-menu>
            </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 闸门 -->
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
      <a-card :bordered="false">
        <div style="text-align: right;">
          <a-icon type="close-circle" @click="hideGateList" />
        </div>
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">

              <a-col :md="12" :sm="12">
                <a-form-item label="闸门编号">
                  <a-input placeholder="" v-model="queryParam2.code"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="9" :sm="24">
             <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>

            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增闸门</a-button>
          <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
          <a-button @click="handleAddGateBlock" type="primary" icon="plus" style="margin-top: 16px">已有闸门</a-button>

          <a-dropdown v-if="selectedRowKeys2.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel2">
                <a-icon type="delete"/>
                取消关联
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px"> 批量操作
              <a-icon type="down"/>
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
            selectedRowKeys2.length }}</a>项
            <a style="margin-left: 24px" @click="onClearSelected2">清空</a>
          </div>
          <a-table
            style="height:500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns2"
            :dataSource="dataSource2"
            :pagination="ipagination2"
            :loading="loading2"
            :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
            @change="handleTableChange2">
           <span slot="action" slot-scope="text, record">
           <a @click="handleEdit2(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多 <a-icon type="down"/>
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete2(record.id)">
                  <a>取消关联</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 摄像头 -->
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 3">
      <a-card :bordered="false">
        <div style="text-align: right;">
          <a-icon type="close-circle" @click="hideGateList" />
        </div>
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">
    
              <a-col :md="12" :sm="12">
                <a-form-item label="序列号">
                  <a-input placeholder="" v-model="queryParam3.squNum"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="9" :sm="24">
             <a-button type="primary" @click="searchQuery3" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset3" icon="reload" style="margin-left: 8px">重置</a-button>
    
            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAdd3" type="primary" icon="plus" style="margin-top: 16px">新增摄像头</a-button>
          <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
          <a-button @click="handleAddCameraBlock" type="primary" icon="plus" style="margin-top: 16px">已有摄像头</a-button>
    
          <a-dropdown v-if="selectedRowKeys3.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel3">
                <a-icon type="delete"/>
                取消关联
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px"> 批量操作
              <a-icon type="down"/>
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
            selectedRowKeys3.length }}</a>项
            <a style="margin-left: 24px" @click="onClearSelected3">清空</a>
          </div>
          <a-table
            style="height:500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns3"
            :dataSource="dataSource3"
            :pagination="ipagination3"
            :loading="loading3"
            :rowSelection="{selectedRowKeys: selectedRowKeys3, onChange: onSelectChange3}"
            @change="handleTableChange3">
           <span slot="action" slot-scope="text, record">
           <a @click="handleEdit3(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多 <a-icon type="down"/>
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete3(record.id)">
                  <a>取消关联</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 墒情仪 -->
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 4">
      <a-card :bordered="false">
        <div style="text-align: right;">
          <a-icon type="close-circle" @click="hideGateList" />
        </div>
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">
    
              <a-col :md="12" :sm="12">
                <a-form-item label="编码">
                  <a-input placeholder="" v-model="queryParam4.code"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="9" :sm="24">
             <a-button type="primary" @click="searchQuery4" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset4" icon="reload" style="margin-left: 8px">重置</a-button>
    
            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAdd4" type="primary" icon="plus" style="margin-top: 16px">新增墒情仪</a-button>
          <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
          <a-button @click="handleAddMmeteBlock" type="primary" icon="plus" style="margin-top: 16px">已有墒情仪</a-button>
    
          <a-dropdown v-if="selectedRowKeys4.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel4">
                <a-icon type="delete"/>
                取消关联
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px"> 批量操作
              <a-icon type="down"/>
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
            selectedRowKeys4.length }}</a>项
            <a style="margin-left: 24px" @click="onClearSelected4">清空</a>
          </div>
          <a-table
            style="height:500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns4"
            :dataSource="dataSource4"
            :pagination="ipagination4"
            :loading="loading4"
            :rowSelection="{selectedRowKeys: selectedRowKeys4, onChange: onSelectChange4}"
            @change="handleTableChange4">
           <span slot="action" slot-scope="text, record">
           <a @click="handleEdit4(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多 <a-icon type="down"/>
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete4(record.id)">
                  <a>取消关联</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 机井 -->
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 5">
      <a-card :bordered="false">
        <div style="text-align: right;">
          <a-icon type="close-circle" @click="hideGateList" />
        </div>
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">
    
              <a-col :md="12" :sm="12">
                <a-form-item label="编码">
                  <a-input placeholder="" v-model="queryParam5.code"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="9" :sm="24">
             <a-button type="primary" @click="searchQuery5" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset5" icon="reload" style="margin-left: 8px">重置</a-button>
    
            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAdd5" type="primary" icon="plus" style="margin-top: 16px">新增机井</a-button>
          <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
          <a-button @click="handleAddMpwellBlock" type="primary" icon="plus" style="margin-top: 16px">已有机井</a-button>
    
          <a-dropdown v-if="selectedRowKeys5.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel5">
                <a-icon type="delete"/>
                取消关联
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px"> 批量操作
              <a-icon type="down"/>
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
            selectedRowKeys5.length }}</a>项
            <a style="margin-left: 24px" @click="onClearSelected5">清空</a>
          </div>
          <a-table
            style="height:500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns5"
            :dataSource="dataSource5"
            :pagination="ipagination5"
            :loading="loading5"
            :rowSelection="{selectedRowKeys: selectedRowKeys5, onChange: onSelectChange5}"
            @change="handleTableChange5">
           <span slot="action" slot-scope="text, record">
           <a @click="handleEdit5(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多 <a-icon type="down"/>
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete5(record.id)">
                  <a>取消关联</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 液位计 -->
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 6">
      <a-card :bordered="false">
        <div style="text-align: right;">
          <a-icon type="close-circle" @click="hideGateList" />
        </div>
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">
    
              <a-col :md="12" :sm="12">
                <a-form-item label="编码">
                  <a-input placeholder="" v-model="queryParam6.code"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="9" :sm="24">
             <a-button type="primary" @click="searchQuery6" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset6" icon="reload" style="margin-left: 8px">重置</a-button>
    
            </a-col>
          </span>
            </a-row>
          </a-form>
        </div>
        <!-- 操作按钮区域 -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAdd6" type="primary" icon="plus" style="margin-top: 16px">新增液位计</a-button>
          <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
          <a-button @click="handleAddYwjBlock" type="primary" icon="plus" style="margin-top: 16px">已有液位计</a-button>
    
          <a-dropdown v-if="selectedRowKeys6.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel6">
                <a-icon type="delete"/>
                取消关联
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px"> 批量操作
              <a-icon type="down"/>
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
            selectedRowKeys6.length }}</a>项
            <a style="margin-left: 24px" @click="onClearSelected6">清空</a>
          </div>
          <a-table
            style="height:500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns6"
            :dataSource="dataSource6"
            :pagination="ipagination6"
            :loading="loading6"
            :rowSelection="{selectedRowKeys: selectedRowKeys6, onChange: onSelectChange6}"
            @change="handleTableChange6">
           <span slot="action" slot-scope="text, record">
           <a @click="handleEdit5(record)">编辑</a>
          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多 <a-icon type="down"/>
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete6(record.id)">
                  <a>取消关联</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- 表单区域 -->
    <block-modal ref="modalForm" @ok="modalFormOk"></block-modal>
    <gate-modal ref="modalForm2" @ok="modalFormOk2"></gate-modal>
    <camera-modal ref="modalForm3" @ok="modalFormOk3"></camera-modal>
    <mmete-modal ref="modalForm4" @ok="modalFormOk4"></mmete-modal>
    <mpwell-modal ref="modalForm5" @ok="modalFormOk5"></mpwell-modal>
    <ywj-modal ref="modalForm6" @ok="modalFormOk6"></ywj-modal>
    <Select-Gate-Modal ref="selectGateModal" @selectFinished="selectOK"></Select-Gate-Modal>
    <Select-Camera-Modal ref="selectCameraModal" @selectFinished="selectOK3"></Select-Camera-Modal>
    <Select-Mmete-Modal ref="selectMmeteModal" @selectFinished="selectOK4"></Select-Mmete-Modal>
    <Select-Mpwell-Modal ref="selectMpwellModal" @selectFinished="selectOK5"></Select-Mpwell-Modal>
    <Select-Ywj-Modal ref="selectYwjModal" @selectFinished="selectOK6"></Select-Ywj-Modal>
  </a-row>
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { deleteAction, postAction, getAction } from '@/api/manage'
  import { filterObj } from '@/utils/util'
  import BlockModal from './modules/BlockModal'
  import GateModal from './modules/GateModal'
  import CameraModal from './modules/CameraModal'
  import MmeteModal from './modules/MmeteModal'
  import MpwellModal from './modules/MpwellModal'
  import YwjModal from './modules/YwjModal'
  import SelectGateModal from './modules/SelectGateModal'
  import SelectCameraModal from './modules/SelectCameraModal'
  import SelectMmeteModal from './modules/SelectMmeteModal'
  import SelectMpwellModal from './modules/SelectMpwellModal'
  import SelectYwjModal from './modules/SelectYwjModal'
  import moment from 'moment'

  export default {
    name: 'BlockList',
    mixins: [JeecgListMixin],
    components: {
      SelectGateModal,
      SelectCameraModal,
      SelectMmeteModal,
      SelectMpwellModal,
      SelectYwjModal,
      BlockModal,
      GateModal,
      CameraModal,
      MmeteModal,
      MpwellModal,
      YwjModal,
      moment
    },
    data() {
      return {
        currentBlockId: '',//当前选择的地块id
        queryParam2: {},
        queryParam3: {},
        queryParam4: {},
        queryParam5: {},
        queryParam6: {},
        
        dataSource2: [],
        dataSource3: [],
        dataSource4: [],
        dataSource5: [],
        dataSource6: [],
        ipagination1: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        ipagination2: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        ipagination3: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        ipagination4: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        ipagination5: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        ipagination6: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        isorter1: {
          column: 'createTime',
          order: 'desc'
        },
        isorter2: {
          column: 'createTime',
          order: 'desc'
        },
        isorter3: {
          column: 'createTime',
          order: 'desc'
        },
        isorter4: {
          column: 'createTime',
          order: 'desc'
        },
        isorter5: {
          column: 'createTime',
          order: 'desc'
        },
        isorter6: {
          column: 'createTime',
          order: 'desc'
        },
        filters1: {},
        filters2: {},
        filters3: {},
        filters4: {},
        filters5: {},
        filters6: {},
        loading1: false,
        loading2: false,
        loading3: false,
        loading4: false,
        loading5: false,
        loading6: false,
        selectedRowKeys1: [],
        selectedRowKeys2: [],
        selectedRowKeys3: [],
        selectedRowKeys4: [],
        selectedRowKeys5: [],
        selectedRowKeys6: [],
        selectionRows1: [],
        selectionRows2: [],
        selectionRows3: [],
        selectionRows4: [],
        selectionRows5: [],
        selectionRows6: [],
        rightcolval:0,
        columns:
          [
            {
              title: '地块编号',
              align: 'center',
              dataIndex: 'code'
            },
            {
              title: '地块名称',
              align: 'center',
              dataIndex: 'name'
            },
            {
              title: '面积',
              dataIndex: 'area',
              align:"center",
              sorter: true,
            },
            {
              title: '操作',
              dataIndex: 'action',
              align: 'center',
              scopedSlots: { customRender: 'action' }
            }
          ],
          columns2: [{
            title: '闸门编号',
            align: 'center',
            dataIndex: 'code',
            width: 120
          },
            {
              title: '闸门名称',
              align: 'center',
              width: 100,
              dataIndex: 'name'
            },
            {
              title: '操作',
              dataIndex: 'action',
              scopedSlots: { customRender: 'action' },
              align: 'center',
              width: 120
            }],
          columns3: [{
            title: '摄像头编号',
            align: 'center',
            dataIndex: 'code',
            width: 120
          },
            {
              title: '摄像头名称',
              align: 'center',
              width: 100,
              dataIndex: 'name'
            },
            {
              title: '摄像头序列号',
              align: 'center',
              width: 100,
              dataIndex: 'squNum'
            },
            {
              title: '操作',
              dataIndex: 'action',
              scopedSlots: { customRender: 'action' },
              align: 'center',
              width: 120
            }],
        columns4: [{
            title: '墒情仪编号',
            align: 'center',
            dataIndex: 'code',
            width: 120
          },
          {
            title: '墒情仪名称',
            align: 'center',
            width: 100,
            dataIndex: 'name'
          },
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: { customRender: 'action' },
            align: 'center',
            width: 120
          }],
        columns5: [{
            title: '机井编号',
            align: 'center',
            dataIndex: 'code',
            width: 120
          },
          {
            title: '机井名称',
            align: 'center',
            width: 100,
            dataIndex: 'name'
          },
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: { customRender: 'action' },
            align: 'center',
            width: 120
          }],
        columns6: [{
            title: '液位计编号',
            align: 'center',
            dataIndex: 'code',
            width: 120
          },
          {
            title: '液位计名称',
            align: 'center',
            width: 100,
            dataIndex: 'name'
          },
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: { customRender: 'action' },
            align: 'center',
            width: 120
          }],
        // 高级查询参数
        superQueryParams2: '',
        superQueryParams3: '',
        superQueryParams4: '',
        superQueryParams5: '',
        superQueryParams6: '',
        // 高级查询拼接条件
        superQueryMatchType2: 'and',
        superQueryMatchType3: 'and',
        superQueryMatchType4: 'and',
        superQueryMatchType5: 'and',
        superQueryMatchType6: 'and',
        url: {
          list: "/wiis/block/list",
          delete: "/wiis/block/delete",
          
          list2: '/wiis/gate/gateBlockList',
          list3: '/wiis/camera/cameraBlockList',
          list4: '/wiis/mmete/mmeteBlockList',
          list5: '/wiis/mpwell/mpwellBlockList',
          list6: '/wiis/ywj/ywjBlockList',
          addGateBlock: '/wiis/gate/addGateBlock',
          addCameraBlock: '/wiis/camera/addCameraBlock',
          addMmeteBlock: '/wiis/mmete/addMmeteBlock',
          addMpwellBlock: '/wiis/mpwell/addMpwellBlock',
          addYwjBlock: '/wiis/ywj/addYwjBlock',
          delete2: '/wiis/gate/deleteGateBlock',
          delete3: '/wiis/camera/deleteCameraBlock',
          delete4: '/wiis/mmete/deleteMmeteBlock',
          delete5: '/wiis/mpwell/deleteMpwellBlock',
          delete6: '/wiis/ywj/deleteYwjBlock',
          deleteBatch2: '/wiis/gate/deleteGateBlockBatch',
          deleteBatch3: '/wiis/camera/deleteCameraBlockBatch',
          deleteBatch4: '/wiis/mmete/deleteMmeteBlockBatch',
          deleteBatch5: '/wiis/mpwell/deleteMpwellBlockBatch',
          deleteBatch6: '/wiis/ywj/deleteYwjBlockBatch',
          
          
        }
      }
    },
    computed: {
      leftColMd() {
        return this.selectedRowKeys1.length === 0 ? 24 : 12
      },
      rightColMd() {
        return this.selectedRowKeys1.length === 0 ? 0 : 12
      }
    },
    methods: {
      onClearSelected() {
      },
      onClearSelected1() {
        this.selectedRowKeys1 = []
        this.selectionRows1 = []
      },
      onClearSelected2() {
        this.selectedRowKeys2 = []
        this.selectionRows2 = []
      },
      onClearSelected3() {
        this.selectedRowKeys3 = []
        this.selectionRows3= []
      },
      onClearSelected4() {
        this.selectedRowKeys4 = []
        this.selectionRows4= []
      },
      onClearSelected5() {
        this.selectedRowKeys5 = []
        this.selectionRows5= []
      },
      onClearSelected6() {
        this.selectedRowKeys6 = []
        this.selectionRows6= []
      },
      onSelectChange1(selectedRowKeys, selectionRows) {
        this.rightcolval = 1
        this.selectedRowKeys1 = selectedRowKeys
        this.selectionRows1 = selectionRows
        this.currentBlockId = selectedRowKeys[0]
        this.loadData2()
      },
      onSelectChange2(selectedRowKeys, selectionRows) {
        this.selectedRowKeys2 = selectedRowKeys
        this.selectionRows2 = selectionRows
      },
      onSelectChange3(selectedRowKeys, selectionRows) {
        this.selectedRowKeys3 = selectedRowKeys
        this.selectionRows3 = selectionRows
      },
      onSelectChange4(selectedRowKeys, selectionRows) {
        this.selectedRowKeys4 = selectedRowKeys
        this.selectionRows4 = selectionRows
      },
      onSelectChange5(selectedRowKeys, selectionRows) {
        this.selectedRowKeys5 = selectedRowKeys
        this.selectionRows5 = selectionRows
      },
      onSelectChange6(selectedRowKeys, selectionRows) {
        this.selectedRowKeys6 = selectedRowKeys
        this.selectionRows6 = selectionRows
      },

      getQueryParams2() {
        //获取查询条件
        let sqp = {}
        if (this.superQueryParams2) {
          sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
          sqp['superQueryMatchType'] = this.superQueryMatchType2
        }
        var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
        param.field = this.getQueryField2()
        param.pageNo = this.ipagination2.current
        param.pageSize = this.ipagination2.pageSize
        return filterObj(param)
      },
      getQueryParams3() {
        //获取查询条件
        let sqp = {}
        if (this.superQueryParams3) {
          sqp['superQueryParams'] = encodeURI(this.superQueryParams3)
          sqp['superQueryMatchType'] = this.superQueryMatchType3
        }
        var param = Object.assign(sqp, this.queryParam3, this.isorter3, this.filters3)
        param.field = this.getQueryField3()
        param.pageNo = this.ipagination3.current
        param.pageSize = this.ipagination3.pageSize
        return filterObj(param)
      },
      getQueryParams4() {
        //获取查询条件
        let sqp = {}
        if (this.superQueryParams4) {
          sqp['superQueryParams'] = encodeURI(this.superQueryParams4)
          sqp['superQueryMatchType'] = this.superQueryMatchType4
        }
        var param = Object.assign(sqp, this.queryParam4, this.isorter4, this.filters4)
        param.field = this.getQueryField4()
        param.pageNo = this.ipagination4.current
        param.pageSize = this.ipagination4.pageSize
        return filterObj(param)
      },
      getQueryParams5() {
        //获取查询条件
        let sqp = {}
        if (this.superQueryParams5) {
          sqp['superQueryParams'] = encodeURI(this.superQueryParams5)
          sqp['superQueryMatchType'] = this.superQueryMatchType5
        }
        var param = Object.assign(sqp, this.queryParam5, this.isorter5, this.filters5)
        param.field = this.getQueryField5()
        param.pageNo = this.ipagination5.current
        param.pageSize = this.ipagination5.pageSize
        return filterObj(param)
      },
      getQueryParams6() {
        //获取查询条件
        let sqp = {}
        if (this.superQueryParams6) {
          sqp['superQueryParams'] = encodeURI(this.superQueryParams6)
          sqp['superQueryMatchType'] = this.superQueryMatchType6
        }
        var param = Object.assign(sqp, this.queryParam6, this.isorter6, this.filters6)
        param.field = this.getQueryField6()
        param.pageNo = this.ipagination6.current
        param.pageSize = this.ipagination6.pageSize
        return filterObj(param)
      },
      getQueryField2() {
        //TODO 字段权限控制
        var str = 'id,'
        this.columns2.forEach(function(value) {
          str += ',' + value.dataIndex
        })
        return str
      },
      getQueryField3() {
        //TODO 字段权限控制
        var str = 'id,'
        this.columns3.forEach(function(value) {
          str += ',' + value.dataIndex
        })
        return str
      },
      getQueryField4() {
        //TODO 字段权限控制
        var str = 'id,'
        this.columns4.forEach(function(value) {
          str += ',' + value.dataIndex
        })
        return str
      },
      getQueryField5() {
        //TODO 字段权限控制
        var str = 'id,'
        this.columns5.forEach(function(value) {
          str += ',' + value.dataIndex
        })
        return str
      },
      getQueryField6() {
        //TODO 字段权限控制
        var str = 'id,'
        this.columns6.forEach(function(value) {
          str += ',' + value.dataIndex
        })
        return str
      },
      handleAdd2: function() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.modalForm2.roleDisabled = true
          this.$refs.modalForm2.title = '新增闸门'
           //传递blockId
          this.$refs.modalForm2.edit({blockId:this.currentBlockId})
        }
      },
      handleAdd3: function() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.modalForm3.roleDisabled = true
          this.$refs.modalForm3.title = '新增摄像头'
          //传递blockId
          this.$refs.modalForm3.edit({blockId:this.currentBlockId})
        }
      },
      handleAdd4: function() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.modalForm4.roleDisabled = true
          this.$refs.modalForm4.title = '新增墒情仪'
          //传递blockId
          this.$refs.modalForm4.edit({blockId:this.currentBlockId})
        }
      },
      handleAdd5: function() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.modalForm5.roleDisabled = true
          this.$refs.modalForm5.title = '新增机井'
          //传递blockId
          this.$refs.modalForm5.edit({blockId:this.currentBlockId})
        }
      },
      handleAdd6: function() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.modalForm6.roleDisabled = true
          this.$refs.modalForm6.title = '新增机井'
          //传递blockId
          this.$refs.modalForm6.edit({blockId:this.currentBlockId})
        }
      },
      handleEdit2: function(record) {
        this.$refs.modalForm2.title = '编辑闸门'
        this.$refs.modalForm2.roleDisabled = true
        this.$refs.modalForm2.edit(record)
      },
      handleEdit3: function(record) {
        this.$refs.modalForm3.title = '编辑摄像头'
        this.$refs.modalForm3.roleDisabled = true
        this.$refs.modalForm3.edit(record)
      },
      handleEdit4: function(record) {
        this.$refs.modalForm4.title = '编辑墒情仪'
        this.$refs.modalForm4.roleDisabled = true
        this.$refs.modalForm4.edit(record)
      },
      handleEdit5: function(record) {
        this.$refs.modalForm5.title = '编辑机井'
        this.$refs.modalForm5.roleDisabled = true
        this.$refs.modalForm5.edit(record)
      },
      handleEdit6: function(record) {
        this.$refs.modalForm6.title = '编辑液位计'
        this.$refs.modalForm6.roleDisabled = true
        this.$refs.modalForm6.edit(record)
      },
     
      modalFormOk2() {
        // 新增/修改 成功时，重载列表
        this.loadData2()
      },
      modalFormOk3() {
        // 新增/修改 成功时，重载列表
        this.loadData3()
      },
      modalFormOk4() {
        // 新增/修改 成功时，重载列表
        this.loadData4()
      },
      modalFormOk5() {
        // 新增/修改 成功时，重载列表
        this.loadData5()
      },
      modalFormOk6() {
        // 新增/修改 成功时，重载列表
        this.loadData6()
      },
      loadData2(arg) {
        if (!this.url.list2) {
          this.$message.error('请设置url.list2属性!')
          return
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination2.current = 1
        }
        if (this.currentBlockId === '') return
        let params = this.getQueryParams2()//查询条件
        params.blockId = this.currentBlockId
        this.loading2 = true
        getAction(this.url.list2, params).then((res) => {
          if (res.success) {
            this.dataSource2 = res.result.records
            this.ipagination2.total = res.result.total

          }
          this.loading2 = false
        })

      },
      loadData3(arg) {
        if (!this.url.list3) {
          this.$message.error('请设置url.list3属性!')
          return
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination3.current = 1
        }
        if (this.currentBlockId === '') return
        let params = this.getQueryParams3()//查询条件
        params.blockId = this.currentBlockId
        this.loading3 = true
        getAction(this.url.list3, params).then((res) => {
          if (res.success) {
            this.dataSource3 = res.result.records
            this.ipagination3.total = res.result.total
      
          }
          this.loading3 = false
        })
      
      },
      loadData4(arg) {
        if (!this.url.list4) {
          this.$message.error('请设置url.list4属性!')
          return
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination4.current = 1
        }
        if (this.currentBlockId === '') return
        let params = this.getQueryParams4()//查询条件
        params.blockId = this.currentBlockId
        this.loading4 = true
        getAction(this.url.list4, params).then((res) => {
          if (res.success) {
            this.dataSource4 = res.result.records
            this.ipagination4.total = res.result.total
      
          }
          this.loading4 = false
        })
      
      },
      loadData5(arg) {
        if (!this.url.list5) {
          this.$message.error('请设置url.list5属性!')
          return
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination5.current = 1
        }
        if (this.currentBlockId === '') return
        let params = this.getQueryParams5()//查询条件
        params.blockId = this.currentBlockId
        this.loading5 = true
        getAction(this.url.list5, params).then((res) => {
          if (res.success) {
            this.dataSource5 = res.result.records
            this.ipagination5.total = res.result.total
      
          }
          this.loading5 = false
        })
      
      },
      loadData6(arg) {
        if (!this.url.list6) {
          this.$message.error('请设置url.list6属性!')
          return
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination6.current = 1
        }
        if (this.currentBlockId === '') return
        let params = this.getQueryParams6()//查询条件
        params.blockId = this.currentBlockId
        this.loading6 = true
        getAction(this.url.list6, params).then((res) => {
          if (res.success) {
            this.dataSource6 = res.result.records
            this.ipagination6.total = res.result.total
      
          }
          this.loading6 = false
        })
      
      },
      handleDelete1: function(id) {
        this.handleDelete(id)
        this.dataSource2 = []
        this.currentBlockId = ''
      },
      handleDelete2: function(id) {
        if (!this.url.delete2) {
          this.$message.error('请设置url.delete2属性!')
          return
        }
        var that = this
        deleteAction(that.url.delete2, { blockId: this.currentBlockId, gateId: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData2()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      handleDelete3: function(id) {
        if (!this.url.delete3) {
          this.$message.error('请设置url.delete3属性!')
          return
        }
        var that = this
        deleteAction(that.url.delete3, { blockId: this.currentBlockId, cameraId: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData3()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      handleDelete4: function(id) {
        if (!this.url.delete4) {
          this.$message.error('请设置url.delete4属性!')
          return
        }
        var that = this
        deleteAction(that.url.delete4, { blockId: this.currentBlockId, mmeteId: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData4()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      handleDelete5: function(id) {
        if (!this.url.delete5) {
          this.$message.error('请设置url.delete5属性!')
          return
        }
        var that = this
        deleteAction(that.url.delete5, { blockId: this.currentBlockId, mpwellId: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData5()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      handleDelete6: function(id) {
        if (!this.url.delete6) {
          this.$message.error('请设置url.delete6属性!')
          return
        }
        var that = this
        deleteAction(that.url.delete6, { blockId: this.currentBlockId, ywjId: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData6()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      batchDel2: function() {

        if (!this.url.deleteBatch2) {
          this.$message.error('请设置url.deleteBatch2属性!')
          return
        }
        if (this.selectedRowKeys2.length <= 0) {
          this.$message.warning('请选择一条记录！')
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys2.length; a++) {
            ids += this.selectedRowKeys2[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认取消关联',
            content: '是否删除选中数据?',
            onOk: function() {
              deleteAction(that.url.deleteBatch2, { blockId: that.currentBlockId, gateIds: ids }).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.loadData2()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                }
              })
            }
          })
        }
      },
      batchDel3: function() {
      
        if (!this.url.deleteBatch3) {
          this.$message.error('请设置url.deleteBatch3属性!')
          return
        }
        if (this.selectedRowKeys3.length <= 0) {
          this.$message.warning('请选择一条记录！')
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys3.length; a++) {
            ids += this.selectedRowKeys3[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认取消关联',
            content: '是否删除选中数据?',
            onOk: function() {
              deleteAction(that.url.deleteBatch3, { blockId: that.currentBlockId, cameraIds: ids }).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.loadData3()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                }
              })
            }
          })
        }
      },
      batchDel4: function() {
      
        if (!this.url.deleteBatch4) {
          this.$message.error('请设置url.deleteBatch4属性!')
          return
        }
        if (this.selectedRowKeys4.length <= 0) {
          this.$message.warning('请选择一条记录！')
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys4.length; a++) {
            ids += this.selectedRowKeys4[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认取消关联',
            content: '是否删除选中数据?',
            onOk: function() {
              deleteAction(that.url.deleteBatch4, { blockId: that.currentBlockId, mmeteIds: ids }).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.loadData4()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                }
              })
            }
          })
        }
      },
      batchDel5: function() {
      
        if (!this.url.deleteBatch5) {
          this.$message.error('请设置url.deleteBatch5属性!')
          return
        }
        if (this.selectedRowKeys5.length <= 0) {
          this.$message.warning('请选择一条记录！')
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys5.length; a++) {
            ids += this.selectedRowKeys5[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认取消关联',
            content: '是否删除选中数据?',
            onOk: function() {
              deleteAction(that.url.deleteBatch5, { blockId: that.currentBlockId, mpwellIds: ids }).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.loadData5()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                }
              })
            }
          })
        }
      },
      batchDel6: function() {
        if (!this.url.deleteBatch6) {
          this.$message.error('请设置url.deleteBatch6属性!')
          return
        }
        if (this.selectedRowKeys6.length <= 0) {
          this.$message.warning('请选择一条记录！')
          return
        } else {
          var ids = ''
          for (var a = 0; a < this.selectedRowKeys6.length; a++) {
            ids += this.selectedRowKeys6[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认取消关联',
            content: '是否删除选中数据?',
            onOk: function() {
              deleteAction(that.url.deleteBatch6, { blockId: that.currentBlockId, ywjIds: ids }).then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.loadData6()
                  that.onClearSelected()
                } else {
                  that.$message.warning(res.message)
                }
              })
            }
          })
        }
      },
      selectOK(data) {
        let params = {}
        params.blockId = this.currentBlockId
        params.gateIdList = []
        for (var a = 0; a < data.length; a++) {
          params.gateIdList.push(data[a])
        }
        postAction(this.url.addGateBlock, params).then((res) => {
          if (res.success) {
            this.loadData2()
            this.$message.success(res.message)
          } else {
            this.$message.warning(res.message)
          }
        })
      },
      selectOK3(data) {
        let params = {}
        params.blockId = this.currentBlockId
        params.cameraIdList = []
        for (var a = 0; a < data.length; a++) {
          params.cameraIdList.push(data[a])
        }
        postAction(this.url.addCameraBlock, params).then((res) => {
          if (res.success) {
            this.loadData3()
            this.$message.success(res.message)
          } else {
            this.$message.warning(res.message)
          }
        })
      },
      selectOK4(data) {
        let params = {}
        params.blockId = this.currentBlockId
        params.mmeteIdList = []
        for (var a = 0; a < data.length; a++) {
          params.mmeteIdList.push(data[a])
        }
        postAction(this.url.addMmeteBlock, params).then((res) => {
          if (res.success) {
            this.loadData4()
            this.$message.success(res.message)
          } else {
            this.$message.warning(res.message)
          }
        })
      },
      selectOK5(data) {
        let params = {}
        params.blockId = this.currentBlockId
        params.mpwellIdList = []
        for (var a = 0; a < data.length; a++) {
          params.mpwellIdList.push(data[a])
        }
        postAction(this.url.addMpwellBlock, params).then((res) => {
          if (res.success) {
            this.loadData5()
            this.$message.success(res.message)
          } else {
            this.$message.warning(res.message)
          }
        })
      },
      selectOK6(data) {
        let params = {}
        params.blockId = this.currentBlockId
        params.ywjIdList = []
        for (var a = 0; a < data.length; a++) {
          params.ywjIdList.push(data[a])
        }
        postAction(this.url.addYwjBlock, params).then((res) => {
          if (res.success) {
            this.loadData6()
            this.$message.success(res.message)
          } else {
            this.$message.warning(res.message)
          }
        })
      },
      
      

      handleAddGateBlock() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.selectGateModal.visible = true
        }
      },
      handleAddCameraBlock() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.selectCameraModal.visible = true
        }
      },
      handleAddMmeteBlock() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.selectMmeteModal.visible = true
        }
      },
      handleAddMpwellBlock() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.selectMpwellModal.visible = true
        }
      },
      handleAddYwjBlock() {
        if (this.currentBlockId == '') {
          this.$message.error('请选择一个地块!')
        } else {
          this.$refs.selectYwjModal.visible = true
        }
      },
      //打开闸门面板
      handleOpen(record) {
        this.rightcolval = 1
        this.selectedRowKeys1 = [record.id]
        // this.model1 = Object.assign({}, record)
        this.currentBlockId = record.id
        this.onClearSelected2()
        this.loadData2()
      },
      //打开摄像头面板
      handleOpen3(record) {
        this.rightcolval = 3
        this.selectedRowKeys1 = [record.id]
        // this.model1 = Object.assign({}, record)
        this.currentBlockId = record.id
        this.onClearSelected3()
        this.loadData3()
      },
      handleOpen4(record) {
        this.rightcolval = 4
        this.selectedRowKeys1 = [record.id]
        // this.model1 = Object.assign({}, record)
        this.currentBlockId = record.id
        this.onClearSelected4()
        this.loadData4()
      },
      handleOpen5(record) {
        this.rightcolval = 5
        this.selectedRowKeys1 = [record.id]
        // this.model1 = Object.assign({}, record)
        this.currentBlockId = record.id
        this.onClearSelected5()
        this.loadData5()
      },
      handleOpen6(record) {
        this.rightcolval = 6
        this.selectedRowKeys1 = [record.id]
        // this.model1 = Object.assign({}, record)
        this.currentBlockId = record.id
        this.onClearSelected6()
        this.loadData6()
      },
      searchQuery2() {
        this.loadData2(1)
      },
      searchQuery3() {
        this.loadData3(1)
      },
      searchQuery4() {
        this.loadData4(1)
      },
      searchQuery5() {
        this.loadData5(1)
      },
      searchQuery6() {
        this.loadData6(1)
      },
      searchReset2() {
        this.queryParam2 = {}
        this.loadData2(1)
      },
      searchReset3() {
        this.queryParam3 = {}
        this.loadData3(1)
      },
      searchReset4() {
        this.queryParam4 = {}
        this.loadData4(1)
      },
      searchReset5() {
        this.queryParam5 = {}
        this.loadData5(1)
      },
      searchReset6() {
        this.queryParam6 = {}
        this.loadData6(1)
      },
      handleTableChange2(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter2.column = sorter.field
          this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination2 = pagination
        this.loadData2()
      },
      handleTableChange3(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter3.column = sorter.field
          this.isorter3.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination3 = pagination
        this.loadData3()
      },
      handleTableChange4(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter4.column = sorter.field
          this.isorter4.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination4 = pagination
        this.loadData4()
      },
      handleTableChange5(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter5.column = sorter.field
          this.isorter5.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination5 = pagination
        this.loadData5()
      },
      handleTableChange6(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter6.column = sorter.field
          this.isorter6.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination6 = pagination
        this.loadData6()
      },
      //隐藏右侧闸门面板
      hideGateList(){
        //this.rightcolval = 0
        this.selectedRowKeys1 = []
      },
    }
  }
</script>
<style scoped>
@import '~@assets/less/common.less';
  /** Button按钮间距 */
  .ant-btn {
    margin-left: 8px
  }
</style>